package org.wdcode.shop.action.essay;

import org.wdcode.common.util.DateUtil;
import org.wdcode.shop.action.BaseShopHelperAdviceAction;
import org.wdcode.shop.po.EssayInfo;
import org.wdcode.shop.service.EssayInfoService;

/**
 * 文章操作Action
 * @author WD
 * @since JDK6
 * @version 1.0 2009-11-04
 */
public class EssayInfoAction extends BaseShopHelperAdviceAction<EssayInfoService, EssayInfo> {
	// 序列化 ID
	private static final long	serialVersionUID	= -867771427890970812L;

	/**
	 * 添加文章
	 */
	@Override
	public String add() throws Exception {
		// 添加创建人
		getEntity().setEssayUser(getUserHelper().getUser().getId());
		// 添加创建时间
		getEntity().setCreateDate(DateUtil.getTime());
		// 添加
		return super.add();
	}
}
